import request from "@/utils/request";

// 查询产品原料列表
export function listRawMaterial(query) {
  return request({
    url: "/md/rawMaterial/list",
    method: "get",
    params: query,
  });
}

// 查询产品原料详细
export function getRawMaterial(rawMaterialId) {
  return request({
    url: "/md/rawMaterial/" + rawMaterialId,
    method: "get",
  });
}

// 新增产品原料
export function addRawMaterial(data) {
  return request({
    url: "/md/rawMaterial",
    method: "post",
    data: data,
  });
}

// 修改产品原料
export function updateRawMaterial(data) {
  return request({
    url: "/md/rawMaterial",
    method: "put",
    data: data,
  });
}

// 删除产品原料
export function delRawMaterial(rawMaterialId) {
  return request({
    url: "/md/rawMaterial/" + rawMaterialId,
    method: "delete",
  });
}
